package com.itheima.inputStream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @Author 王加鑫
 * @Date 2021/5/19 15:57
 * @Version 1.0
 */
public class Demo03 {
    public static void main(String[] args) throws IOException {
        FileInputStream inputStream = new FileInputStream("C:\\Users\\JiaXin\\Pictures\\Camera Roll\\3D绘画 女仆 美腿 黑丝 高跟鞋 两位女仆进门后的一幕 4k动漫壁纸_彼岸图网.jpg");
        FileOutputStream outputStream = new FileOutputStream("D:\\MO\\aaa.jpg");

        byte[] bytes = new byte[1024*1024];
        //表示有效字节个数
        int len;
        while ((len = inputStream.read(bytes)) != -1){
            outputStream.write(bytes,0,len);
        }
        inputStream.close();
        outputStream.close();

    }
}
